from common.dealer import Dealer
import common.defines as defines
import wx

class cDealer(Dealer):
    
    def __init__(self, name=''):
        super(cDealer,self).__init__(name=name)
        
    def render_hand(self, dc, sprite):
        base = 100
        if self.current_hand != None:
            for i, card in enumerate(self.current_hand):
                if i==0:
                    x = 0
                    y = 4 * defines.Y_INDEX_MULT + 1
                else:
                    x = card.face * defines.X_INDEX_MULT + 1
                    y = card.suit * defines.Y_INDEX_MULT + 1
                    
                x1 = i*defines.CARD_WIDTH + i*5 + base
                dc.DrawBitmap(sprite.GetSubBitmap(wx.Rect(x, y, defines.CARD_WIDTH, defines.CARD_HEIGHT)), x1, 10)